package ace.cmp.data.methodname.method.name.sql.core.util;

import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Optional;

/**
 * @author caspar
 * @date 2023/2/18 9:39
 */
public final class MethodUtils {
  public static Optional<Method> getMethodByMethodName(Class cls, String methodName) {
    return Arrays.stream(cls.getMethods()).filter(p -> p.getName().equals(methodName)).findFirst();
  }
}
